//
//  MeTableViewCell.m
//  QT
//
//  Created by 甘世清 on 2024/12/28.
//

#import "MeTableViewCell.h"

@implementation MeTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)SQ_Style:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    [self.contentView addSubview:self.pictureImageView];
    [self.pictureImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView).insets(UIEdgeInsetsMake(30, 12, 10, 12));
    }];
    [self.contentView addSubview:self.timeLabel];
    [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.contentView.mas_right).offset(-12);
        make.top.equalTo(self.contentView).offset(10);
    }];
}

- (void)setModel:(PictureModel *)model{
    _model = model;
    [self.pictureImageView sd_setImageWithURL:SQURLImage(@"https://files-ft.oss-cn-chengdu.aliyuncs.com/file/6666cfe627349fc31fac16b2.jpg") placeholderImage:SQGetImage(@"1")];
    self.timeLabel.text = @"2024-10-29";
}

- (UILabel *)timeLabel{
    if (!_timeLabel) {
        _timeLabel = [[UILabel alloc]init];
        _timeLabel.textColor = SQColor666666;
        _timeLabel.font = FONT_REGULAR(12);
    }
    return _timeLabel;
}
- (UIImageView *)pictureImageView{
    if (!_pictureImageView) {
        _pictureImageView = [[UIImageView alloc]init];
        _pictureImageView.contentMode = UIViewContentModeScaleAspectFill;
        _pictureImageView.clipsToBounds = YES;
        _pictureImageView.layer.cornerRadius = 10;
        _pictureImageView.layer.masksToBounds = YES;
    }
    return _pictureImageView;
}


@end
